package com.heima.studentinfoplus.service.impl;

import com.heima.studentinfoplus.entity.ElectiveCourse;
import com.heima.studentinfoplus.entity.StudentProfile;
import com.heima.studentinfoplus.service.StudentService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Override
    public StudentProfile getStudentProfile(String token) {
        // 这里只是一个示例，实际需要从数据库或其他数据源获取学生信息
        StudentProfile profile = new StudentProfile();
        profile.setName("张三");
        profile.setStudentId("20220101");
        profile.setEmail("zhangsan@example.com");
        profile.setGpa(3.8);
        profile.setIntelligenceScore(92);
        profile.setCredits(120);
        profile.setRetakeInfo("无");

        // 示例选修课程数据
        List<ElectiveCourse> courses = Arrays.asList(
            new ElectiveCourse("心理学导论", "选修", "人文类", 0),
            new ElectiveCourse("人工智能基础", "二专", "科技类", 2)
        );
        profile.setElectiveCourses(courses);

        return profile;
    }
}
